-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make into
schedule drop for the destination
#61430
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
r? @pnkfelix |
@matthewjasper the code changes here look fine to me; do you know what is up with the Travis CI failure, though? |
r=me once travis is happy. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
93422c5
to
4c38f26
Compare
I think that the ICE is fixed now. I've had to change how we are checking generators for the transform. This should not affect any generator layout. cc @rust-lang/compiler Since this now seems quite a risky PR: |
@bors p=10 |
@bors r- |
☔ The latest upstream changes (presumably #61373) made this pull request unmergeable. Please resolve the merge conflicts. |
Triage ping @matthewjasper, a few review comments need to be addressed and merge conflicts need to be fixed |
This is blocked on #61872 for now |
@bors r+ |
📌 Commit 3702683 has been approved by |
⌛ Testing commit 3702683 with merge 697ced5a4d57e1a78c284f0f91f2365ff8144716... |
Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-azure |
Seems spurious: a segfault installing awscli:
@bors retry |
Make `into` schedule drop for the destination closes #47949
☀️ Test successful - checks-azure |
It appears this change was a big regression: up to 36% for many benchmarks, and over 500,000% for This should be backed out, or the regression completely fixed, ASAP. cc @rust-lang/wg-compiler-performance |
#65249 backs out the part that caused the perf regression. |
[WIP] Make `into` schedule drop for the destination again #61430 triggered some degenerate behavior in llvm where it would inline functions far too aggressively. This is marked as WIP because it doesn't really solve the problem in general. I've opened this PR more so that there's a place to discuss fixes. <details> <summary>Minimized example of the problem</summary> Uncommenting the `#[inline]` will cause this to take a long time to compile on nightly, since llvm will inline all of the next calls into one enormous function that it spends a very long time handling. ```rust pub trait Iterator { type Item; fn next(&mut self) -> Self::Item; } pub struct Empty; impl Iterator for Empty { type Item = (); fn next(&mut self) {} } pub struct Chain<A, B=Empty> { a: A, b: B, state: ChainState, } #[allow(dead_code)] enum ChainState { Both, Front, Back, } impl<A, B> Iterator for Chain<A, B> where A: Iterator, B: Iterator<Item = A::Item> { type Item = A::Item; //#[inline] //^ uncomment me for degenerate llvm behvaiour with `-O` fn next(&mut self) -> A::Item { let ret; match self.state { ChainState::Both => { let _x = self.a.next(); self.state = ChainState::Back; ret = self.b.next() }, ChainState::Front => ret = self.a.next(), ChainState::Back => ret = self.b.next(), }; ret } } type Chain2<T> = Chain<Chain<T>>; type Chain4<T> = Chain2<Chain2<T>>; type Chain8<T> = Chain4<Chain4<T>>; type Chain16<T> = Chain8<Chain8<T>>; pub fn call_next(x: &mut Chain16<Empty>) { x.next() } ``` </details> Closes #47949
closes #47949